package com.more.db.user.dao;

import com.more.db.core.DatabaseContextHolder;
import com.more.db.user.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @ClassName UserDao
 * @Description TODO
 * @Author yyliu
 * @Date 2018/12/10 18:34
 * @Version 1.0
 **/
@Component
public class UserDao implements UserMapper {

    @Autowired
    UserMapper userMapper;

    @Override
    public List<Map<String, Object>> findList(String corpCode) {

        DatabaseContextHolder.setDatabaseType(corpCode);
        return userMapper.findList(corpCode);
    }
}
